#include "errormanager.h"
#include "mainwindow.h"
#include "QMessageBox"
#include "QObject"
#include <iostream>
 ErrorManager* ErrorManager::instancex = NULL;

ErrorManager::ErrorManager()
{
}

void ErrorManager::DisplayMessage(QString &s)
{

    QMessageBox::information(NULL, QObject::tr("Message"),s,0,0);

}

void ErrorManager::DisplayError(QString &s)
{
    QMessageBox::critical(NULL,QObject::tr("Error"),s,0,0);
}

void ErrorManager::Terminate()
{
    delete instancex;
}

ErrorManager* ErrorManager::GetInstance()
{
    if(instancex==NULL)
        instancex = new ErrorManager();

    return instancex;
}
